import { queryBubbleCharts } from "@/apis/charts";
import { useRequest } from "ahooks";
const useGetBubbleData = (times: string) => {
  const {
    data = {},
    loading,
  } = useRequest(
    async () => {
      const data = await queryBubbleCharts({ times });
      return data;
    },
    {
      refreshDeps: [times], //刷新依赖项
    }
  );

  return { data, loading };
};

export default useGetBubbleData;
